<?php
include 'php/config.php';
include 'php/scripts/utils.php';
$user = $_GET["u"];
$url = $_GET["url"];
$uploaded = $_GET["up"];

$mysqli = new mysqli($MYSQL_HOST, $MYSQL_USERNAME, $MYSQL_PASSWORD, $MYSQL_DB_NAME);
if ($mysqli->connect_errno) {
echo "ERR";
} else {
$query="UPDATE baked_badge SET uploaded = $uploaded WHERE bakedUser=$user AND verifyUrl='". $url ."'";
$verify = $mysqli->query($query);
if (!$verify) {
echo "ERR";
} else {
echo "OK";
}
}
?>